<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
if(username.equals("congli")&&password.equals("123")){
	//用session管理合法用户
	session.setAttribute("user",username);
	RequestDispatcher rd = request.getRequestDispatcher("success.jsp");
	rd.forward(request,response);
}else{
	RequestDispatcher rd = request.getRequestDispatcher("fail.jsp");
	rd.forward(request, response);
}	
%>
</body>
</html>